﻿using FluentNHibernate.Mapping;

namespace Genesis.Persistence.Mapping
{

    using Genesis.Domain;

    public class ThreadMap : ClassMap<Thread>
    {

        public ThreadMap()
        {

            Id(x => x.Id);
            Map(x => x.PostedOn);
            Map(x => x.HostAddress);
            Map(x => x.Title);
            Map(x => x.Summary);
            Map(x => x.ParsedMessage);
            Map(x => x.RawMessage);
            Map(x => x.IsApproved);
            Map(x => x.IsEnabled);
            Map(x => x.IsPinned);
            References<User>(x => x.User);
            HasMany<Reply>(x => x.Replies);

        }

    }

}